package com.java.observer;

import lombok.extern.slf4j.Slf4j;

/**
 * @Author: TongRui乀
 * @Date: 2019/3/6 13:33
 * @description：
 */
@Slf4j
public class ObserverB extends Observer {

    public ObserverB(Subject subject){

        this.subject = subject;

        this.subject.addObserver(this);

    }

    @Override
    public void update() {
        log.info("观察者B 观察到主题发生变化了！");
    }
}
